{#
/**
 * @file
 * link
 * we can use this link with icon for Ex. in cards at the bottom as more info link.
 * See link.wingsuit.yaml for documentation.
 */
#}

{# SETTINGS #}
{% set tag_name = tag_name|default('div') %}
{% set attributes = attributes|default(create_attribute()) %}

{% if url is not empty %}
  {% set attributes = attributes.setAttribute('href', url) %}
  {% set tag_name = 'a' %}
{% endif %}

<{{ tag_name }} {{ attributes.addClass(['text-pink-500 inline-flex items-center  md:mb-2 lg:mb-0'] | sort | join(' ') | trim) }}>
{{ text }}
  {% if icon is not empty %}
    {% include "@atoms/svg/_svg--icon.twig" with {
      icon: icon,
      size: 'w-4 h-4 ml-2',
    } only %}
  {% endif %}
</{{ tag_name }}>
